package cn.ym.mall.service;

import cn.ym.mall.entity.Rights;

import java.sql.SQLException;
import java.util.List;

public interface RightsService {
    /**
     * 查询所有权限
     * @return
     */
    public List<Rights> getAll() throws SQLException;

    /**
     * 添加新权限
     * @param rights
     * @return
     */
    public boolean add(Rights rights) throws SQLException;

    /**
     * 根据权限id删除权限
     * @param rgid
     * @return
     */
    public boolean delete(Integer rgid) throws SQLException;

    /**
     * 更新现有权限
     * @param rights
     * @return
     */
    public boolean update(Rights rights) throws SQLException;

    /**
     * 根据权限角色编号查权限
     * @param rigid
     * @return
     */
    public Rights getRightsById(Integer rigid) throws SQLException;

}
